package com.wyg.action;

import com.opensymphony.xwork2.ActionSupport;
import com.wyg.pojo.User;
import com.wyg.service.ZeroService;
import com.wyg.service.impl.ZeroServiceImpl;

public class ZeroAction extends ActionSupport{
	private String phone;
	private String password;
	private User user;
	private ZeroService zsi;
	
	public ZeroService getZsi() {
		return zsi;
	}

	public void setZsi(ZeroService zsi) {
		this.zsi = zsi;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public String login(){
		String phone = getPhone();
		String pwd = getPassword();
		String result = zsi.login(phone, pwd);
		return result;
	}
	
	public String regist(){
		user = getUser();
		user.setStatus("未激活");
		System.out.println(user);
		String result =zsi.regist(user);
		return result;
	}
}
